var fs = require('fs');
var engine = require('underscore').template;

var tpl = {};
tpl.block = engine(fs.readFileSync(__dirname + '/block.tpl', 'utf-8'));
tpl.kickout = engine(fs.readFileSync(__dirname + '/kickout.tpl', 'utf-8'));
tpl.loading = engine(fs.readFileSync(__dirname + '/loading.tpl', 'utf-8'));
tpl.mask = engine(fs.readFileSync(__dirname + '/mask.tpl', 'utf-8'));
tpl.nav = engine(fs.readFileSync(__dirname + '/nav.tpl', 'utf-8'));
tpl.profile = engine(fs.readFileSync(__dirname + '/profile.tpl', 'utf-8'));

tpl.chat2 = {};
tpl.chat2.blocknotice = engine(fs.readFileSync(__dirname + '/chat2/blocknotice.tpl', 'utf-8'));
tpl.chat2.chat2 = engine(fs.readFileSync(__dirname + '/chat2/chat2.tpl', 'utf-8'));
tpl.chat2.chatcontent = engine(fs.readFileSync(__dirname + '/chat2/chatcontent.tpl', 'utf-8'));
tpl.chat2.chatenter = engine(fs.readFileSync(__dirname + '/chat2/chatenter.tpl', 'utf-8'));
tpl.chat2.chatMsg1 = engine(fs.readFileSync(__dirname + '/chat2/chatMsg1.tpl', 'utf-8'));
tpl.chat2.chatMsg2 = engine(fs.readFileSync(__dirname + '/chat2/chatMsg2.tpl', 'utf-8'));
tpl.chat2.imgbox = engine(fs.readFileSync(__dirname + '/chat2/imgbox.tpl', 'utf-8'));
tpl.chat2.prodlink = engine(fs.readFileSync(__dirname + '/chat2/prodlink.tpl', 'utf-8'));
tpl.chat2.sendInquiry = engine(fs.readFileSync(__dirname + '/chat2/sendInquiry.tpl', 'utf-8'));
tpl.chat2.timestamp = engine(fs.readFileSync(__dirname + '/chat2/timestamp.tpl', 'utf-8'));

tpl.contacts = {};
tpl.contacts.list = engine(fs.readFileSync(__dirname + '/contacts/list.tpl', 'utf-8'));
tpl.contacts.search = engine(fs.readFileSync(__dirname + '/contacts/search.tpl', 'utf-8'));
tpl.contacts.wrap = engine(fs.readFileSync(__dirname + '/contacts/wrap.tpl', 'utf-8'));

tpl.dialog = {};
tpl.dialog.button = engine(fs.readFileSync(__dirname + '/dialog/button.tpl', 'utf-8'));
tpl.dialog.main = engine(fs.readFileSync(__dirname + '/dialog/main.tpl', 'utf-8'));

tpl.layout = {};
tpl.layout.main = engine(fs.readFileSync(__dirname + '/layout/main.tpl', 'utf-8'));


module.exports = tpl;